import { createApp } from 'vue'
import App from './App.vue'

import {Button, Icon, NavBar, Tabbar, TabbarItem, Toast, Dialog, Field} from "vant";

import {createWebHistory, createRouter, createWebHashHistory} from 'vue-router'
import routes from "./config/route.ts";
const app = createApp(App)

import "vant/es/toast/style"
import "./global.css"
const router = createRouter({
    //history: createMemoryHistory(),
    //history: createWebHashHistory(),  //使用该模式，在路由跳转时，url改变也会相应显示
    history: createWebHistory(),
    routes,
})

app.use(Button)
app.use(NavBar)
app.use(Icon)
app.use(Tabbar)
app.use(TabbarItem)
app.use(Toast)
app.use(Dialog)
app.use(Field)
app.use(router)
app.mount('#app')